<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>添加用户</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
    <script th:src="@{/js/jquery.min.js}"></script>
    <script th:src="@{/js/bootstrap.min.js}"></script>
</head>
<body style="margin-left: 100px; margin-right: 100px; margin-top: 50px">
<form class="form-horizontal" role="form" th:action= "@{/user/addUser}" th:method="post">
    <div class="form-group">
        <label for="nick" class="col-sm-2 control-label">昵称</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="nick" name="nick" placeholder= "请输入昵称"
                   th:value="${user?.nick}">
        </div>
    </div>
    <div class="form-group" >
        <label for="phone" class="col-sm-2 control-label">手机</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="phone" name="phone" placeholder="请输入手机"
                   th:value="${user?.phone}">
        </div>
    </div>
    <div class="form-group">
        <label for="email" class="col-sm-2 control-label">邮箱</label>
        <div class="col-sm-10">
            <input type="text" class=" form-control" id="email" name="email" placeholder="请输入邮箱"
                   th:value="${user?.email}">
        </div>
    </div>
    <div class="form-group">
        <label for="address" class="col-sm-2 control-label">地址</label>
        <div class="col-sm-10">
            <input type="text" class=" form-control" id="address" name="address" placeholder="请输入地址"
                   th:value="${user?.address}">
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <input type="hidden" id="id" name="id" th:value="${user?.id}"/>
            <button type="submit" class="btn btn-default">提 交</button>
        </div>
    </div>
</form>
</body>
</html>